.class public Lrexsee/network/RexseeWiFi;
.super Ljava/lang/Object;
.source "RexseeWiFi.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final EVENT_ONNETWORKCHANGED:Ljava/lang/String; = "onWiFiNetworkChanged"

.field private static final EVENT_ONNETWORKIDSCHANGED:Ljava/lang/String; = "onWiFiNetworkIdsChanged"

.field private static final EVENT_ONRSSICHANGED:Ljava/lang/String; = "onWiFiRssiChanged"

.field private static final EVENT_ONSCANFINISHED:Ljava/lang/String; = "onWiFiScanFinished"

.field private static final EVENT_ONSTATECHANGED:Ljava/lang/String; = "onWiFiStateChanged"

.field private static final EVENT_ONSUPPLICANTCONNECTIONCHANGED:Ljava/lang/String; = "onWiFiSupplicantConnectionChanged"

.field private static final EVENT_ONSUPPLICANTSTATECHANGED:Ljava/lang/String; = "onWiFiSupplicantStateChanged"

.field private static final EXCEPTION_NOT_ENABLED:Ljava/lang/String; = "WiFi is not enabled yet, please call enable()."

.field private static final INTERFACE_NAME:Ljava/lang/String; = "WiFi"

.field private static final SECURITY_EAP:Ljava/lang/String; = "EAP"

.field private static final SECURITY_NONE:Ljava/lang/String; = "OPEN"

.field private static final SECURITY_PSK:Ljava/lang/String; = "WPA/WPA2 PSK"

.field private static final SECURITY_WEP:Ljava/lang/String; = "WEP"


# instance fields
.field private final EVENT_ONNETWORKCHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONNETWORKIDSCHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONRSSICHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONSCANFINISHED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONSUPPLICANTCONNECTIONCHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final EVENT_ONSUPPLICANTSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field private mIsListeningToBroadcast:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 295
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 56
    new-instance v0, Lrexsee/network/RexseeWiFi$1;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$1;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 64
    new-instance v0, Lrexsee/network/RexseeWiFi$2;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$2;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKIDSCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 70
    new-instance v0, Lrexsee/network/RexseeWiFi$3;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$3;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 76
    new-instance v0, Lrexsee/network/RexseeWiFi$4;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$4;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONRSSICHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 83
    new-instance v0, Lrexsee/network/RexseeWiFi$5;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$5;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSCANFINISHED_Receiver:Landroid/content/BroadcastReceiver;

    .line 89
    new-instance v0, Lrexsee/network/RexseeWiFi$6;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$6;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTCONNECTIONCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 96
    new-instance v0, Lrexsee/network/RexseeWiFi$7;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$7;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 292
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    .line 296
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    .line 297
    iput-object p1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    .line 298
    return-void
.end method

.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 300
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 56
    new-instance v0, Lrexsee/network/RexseeWiFi$1;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$1;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 64
    new-instance v0, Lrexsee/network/RexseeWiFi$2;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$2;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKIDSCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 70
    new-instance v0, Lrexsee/network/RexseeWiFi$3;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$3;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 76
    new-instance v0, Lrexsee/network/RexseeWiFi$4;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$4;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONRSSICHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 83
    new-instance v0, Lrexsee/network/RexseeWiFi$5;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$5;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSCANFINISHED_Receiver:Landroid/content/BroadcastReceiver;

    .line 89
    new-instance v0, Lrexsee/network/RexseeWiFi$6;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$6;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTCONNECTIONCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 96
    new-instance v0, Lrexsee/network/RexseeWiFi$7;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeWiFi$7;-><init>(Lrexsee/network/RexseeWiFi;)V

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    .line 292
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    .line 301
    iput-object p1, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    .line 302
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    .line 303
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 304
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiNetworkChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 305
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiNetworkIdsChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 306
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiRssiChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 307
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiScanFinished"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 308
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiSupplicantConnectionChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 309
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onWiFiSupplicantStateChanged"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 310
    return-void
.end method

.method private static _convertToQuotedString(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p0, "string"    # Ljava/lang/String;

    .prologue
    const-string v2, "\""

    .line 117
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\""

    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\""

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static _getConfiguredNetwork(Ljava/util/List;Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;
    .locals 5
    .param p1, "config"    # Landroid/net/wifi/WifiConfiguration;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/net/wifi/ScanResult;",
            ">;",
            "Landroid/net/wifi/WifiConfiguration;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .local p0, "results":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/ScanResult;>;"
    const-string v4, "\""

    .line 205
    const-string v0, ""

    .line 206
    .local v0, "rtn":Ljava/lang/String;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\"networkId\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p1, Landroid/net/wifi/WifiConfiguration;->networkId:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 207
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"BSSID\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Landroid/net/wifi/WifiConfiguration;->BSSID:Ljava/lang/String;

    if-nez v2, :cond_0

    const/4 v2, 0x0

    :goto_0
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 208
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"SSID\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Landroid/net/wifi/WifiConfiguration;->SSID:Ljava/lang/String;

    invoke-static {v2}, Lrexsee/network/RexseeWiFi;->_removeDoubleQuotes(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 209
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"priority\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p1, Landroid/net/wifi/WifiConfiguration;->priority:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 210
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"status\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p1, Landroid/net/wifi/WifiConfiguration;->status:I

    invoke-static {v2}, Lrexsee/network/RexseeWiFi;->_getStatus(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 211
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"security\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p1}, Lrexsee/network/RexseeWiFi;->_getSecurity(Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 212
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"hasPassword\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p1}, Lrexsee/network/RexseeWiFi;->_hasPassword(Landroid/net/wifi/WifiConfiguration;)Z

    move-result v2

    if-eqz v2, :cond_1

    const-string v2, "true"

    :goto_1
    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 213
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"scannedBSSID\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p0, p1}, Lrexsee/network/RexseeWiFi;->_getScannedBSSID(Ljava/util/List;Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 214
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "{"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "}"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1

    .line 207
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "\""

    invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p1, Landroid/net/wifi/WifiConfiguration;->BSSID:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\""

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    goto/16 :goto_0

    .line 212
    :cond_1
    const-string v2, "false"

    goto :goto_1
.end method

.method private static _getIpAddress(I)Ljava/lang/String;
    .locals 4
    .param p0, "addr"    # I

    .prologue
    .line 227
    const-string v0, "%d.%d.%d.%d"

    const/4 v1, 0x4

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    and-int/lit16 v3, p0, 0xff

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x1

    shr-int/lit8 v3, p0, 0x8

    and-int/lit16 v3, v3, 0xff

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x2

    shr-int/lit8 v3, p0, 0x10

    and-int/lit16 v3, v3, 0xff

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x3

    shr-int/lit8 v3, p0, 0x18

    and-int/lit16 v3, v3, 0xff

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static _getRememberedId(Landroid/net/wifi/ScanResult;Ljava/util/List;)I
    .locals 4
    .param p0, "result"    # Landroid/net/wifi/ScanResult;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/net/wifi/ScanResult;",
            "Ljava/util/List",
            "<",
            "Landroid/net/wifi/WifiConfiguration;",
            ">;)I"
        }
    .end annotation

    .prologue
    .local p1, "configs":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    const/4 v3, -0x1

    .line 189
    if-eqz p0, :cond_0

    if-nez p1, :cond_1

    :cond_0
    move v2, v3

    .line 194
    :goto_0
    return v2

    .line 190
    :cond_1
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v2

    if-lt v1, v2, :cond_2

    move v2, v3

    .line 194
    goto :goto_0

    .line 191
    :cond_2
    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiConfiguration;

    .line 192
    .local v0, "config":Landroid/net/wifi/WifiConfiguration;
    invoke-static {p0, v0}, Lrexsee/network/RexseeWiFi;->_match(Landroid/net/wifi/ScanResult;Landroid/net/wifi/WifiConfiguration;)Z

    move-result v2

    if-eqz v2, :cond_3

    iget v2, v0, Landroid/net/wifi/WifiConfiguration;->networkId:I

    goto :goto_0

    .line 190
    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method private static _getScanResult(Landroid/net/wifi/ScanResult;Ljava/util/List;)Ljava/lang/String;
    .locals 4
    .param p0, "result"    # Landroid/net/wifi/ScanResult;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/net/wifi/ScanResult;",
            "Ljava/util/List",
            "<",
            "Landroid/net/wifi/WifiConfiguration;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .local p1, "configs":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    const-string v3, "\""

    .line 217
    const-string v0, ""

    .line 218
    .local v0, "rtn":Ljava/lang/String;
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "\"BSSID\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 219
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"SSID\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 220
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"frequency\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Landroid/net/wifi/ScanResult;->frequency:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 221
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"level\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Landroid/net/wifi/ScanResult;->level:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 222
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"security\":\""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p0}, Lrexsee/network/RexseeWiFi;->_getSecurity(Landroid/net/wifi/ScanResult;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\""

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 223
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ",\"rememberedId\":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {p0, p1}, Lrexsee/network/RexseeWiFi;->_getRememberedId(Landroid/net/wifi/ScanResult;Ljava/util/List;)I

    move-result v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 224
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "{"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "}"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method private static _getScannedBSSID(Ljava/util/List;Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;
    .locals 4
    .param p1, "config"    # Landroid/net/wifi/WifiConfiguration;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/net/wifi/ScanResult;",
            ">;",
            "Landroid/net/wifi/WifiConfiguration;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .local p0, "results":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/ScanResult;>;"
    const-string v3, ""

    .line 197
    if-eqz p0, :cond_0

    if-nez p1, :cond_1

    :cond_0
    const-string v2, ""

    move-object v2, v3

    .line 202
    :goto_0
    return-object v2

    .line 198
    :cond_1
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_1
    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v2

    if-lt v0, v2, :cond_2

    .line 202
    const-string v2, ""

    move-object v2, v3

    goto :goto_0

    .line 199
    :cond_2
    invoke-interface {p0, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/ScanResult;

    .line 200
    .local v1, "result":Landroid/net/wifi/ScanResult;
    invoke-static {v1, p1}, Lrexsee/network/RexseeWiFi;->_match(Landroid/net/wifi/ScanResult;Landroid/net/wifi/WifiConfiguration;)Z

    move-result v2

    if-eqz v2, :cond_3

    iget-object v2, v1, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    goto :goto_0

    .line 198
    :cond_3
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method private static _getSecurity(Landroid/net/wifi/ScanResult;)Ljava/lang/String;
    .locals 4
    .param p0, "result"    # Landroid/net/wifi/ScanResult;

    .prologue
    const-string v3, "WEP"

    const-string v2, "EAP"

    .line 154
    iget-object v0, p0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "WEP"

    invoke-virtual {v0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 155
    const-string v0, "WEP"

    move-object v0, v3

    .line 159
    :goto_0
    return-object v0

    .line 156
    :cond_0
    iget-object v0, p0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "PSK"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 157
    const-string v0, "WPA/WPA2 PSK"

    goto :goto_0

    .line 158
    :cond_1
    iget-object v0, p0, Landroid/net/wifi/ScanResult;->capabilities:Ljava/lang/String;

    const-string v1, "EAP"

    invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2

    const-string v0, "EAP"

    move-object v0, v2

    goto :goto_0

    .line 159
    :cond_2
    const-string v0, "OPEN"

    goto :goto_0
.end method

.method private static _getSecurity(Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;
    .locals 2
    .param p0, "config"    # Landroid/net/wifi/WifiConfiguration;

    .prologue
    .line 148
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Ljava/util/BitSet;->get(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "WPA/WPA2 PSK"

    .line 151
    :goto_0
    return-object v0

    .line 149
    :cond_0
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Ljava/util/BitSet;->get(I)Z

    move-result v0

    if-nez v0, :cond_1

    .line 150
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Ljava/util/BitSet;->get(I)Z

    move-result v0

    if-eqz v0, :cond_2

    :cond_1
    const-string v0, "EAP"

    goto :goto_0

    .line 151
    :cond_2
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    const/4 v1, 0x0

    aget-object v0, v0, v1

    if-eqz v0, :cond_3

    const-string v0, "WEP"

    goto :goto_0

    :cond_3
    const-string v0, "OPEN"

    goto :goto_0
.end method

.method private _getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;
    .locals 5
    .param p1, "key"    # Ljava/lang/String;

    .prologue
    const-string v4, ""

    .line 249
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 250
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 251
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 252
    const-string v2, ""

    move-object v2, v4

    .line 258
    :goto_0
    return-object v2

    .line 255
    :cond_0
    :try_start_0
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    invoke-static {v2, p1}, Landroid/provider/Settings$System;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    goto :goto_0

    .line 256
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 257
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 258
    const-string v2, ""

    move-object v2, v4

    goto :goto_0
.end method

.method private static _getStatus(I)Ljava/lang/String;
    .locals 1
    .param p0, "status"    # I

    .prologue
    .line 169
    packed-switch p0, :pswitch_data_0

    .line 177
    const-string v0, "unknown"

    :goto_0
    return-object v0

    .line 171
    :pswitch_0
    const-string v0, "current"

    goto :goto_0

    .line 173
    :pswitch_1
    const-string v0, "disabled"

    goto :goto_0

    .line 175
    :pswitch_2
    const-string v0, "enabled"

    goto :goto_0

    .line 169
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method private static _getSupplicantState(Landroid/net/wifi/SupplicantState;)Ljava/lang/String;
    .locals 1
    .param p0, "state"    # Landroid/net/wifi/SupplicantState;

    .prologue
    .line 134
    sget-object v0, Landroid/net/wifi/SupplicantState;->ASSOCIATED:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "associated"

    .line 144
    :goto_0
    return-object v0

    .line 135
    :cond_0
    sget-object v0, Landroid/net/wifi/SupplicantState;->ASSOCIATING:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    const-string v0, "associating"

    goto :goto_0

    .line 136
    :cond_1
    sget-object v0, Landroid/net/wifi/SupplicantState;->COMPLETED:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    const-string v0, "completed"

    goto :goto_0

    .line 137
    :cond_2
    sget-object v0, Landroid/net/wifi/SupplicantState;->DISCONNECTED:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    const-string v0, "disconnected"

    goto :goto_0

    .line 138
    :cond_3
    sget-object v0, Landroid/net/wifi/SupplicantState;->DORMANT:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_4

    const-string v0, "dormant"

    goto :goto_0

    .line 139
    :cond_4
    sget-object v0, Landroid/net/wifi/SupplicantState;->FOUR_WAY_HANDSHAKE:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    const-string v0, "four_way_handshake"

    goto :goto_0

    .line 140
    :cond_5
    sget-object v0, Landroid/net/wifi/SupplicantState;->GROUP_HANDSHAKE:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_6

    const-string v0, "group_handshake"

    goto :goto_0

    .line 141
    :cond_6
    sget-object v0, Landroid/net/wifi/SupplicantState;->INACTIVE:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_7

    const-string v0, "inactive"

    goto :goto_0

    .line 142
    :cond_7
    sget-object v0, Landroid/net/wifi/SupplicantState;->SCANNING:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_8

    const-string v0, "scanning"

    goto :goto_0

    .line 143
    :cond_8
    sget-object v0, Landroid/net/wifi/SupplicantState;->UNINITIALIZED:Landroid/net/wifi/SupplicantState;

    invoke-virtual {p0, v0}, Landroid/net/wifi/SupplicantState;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_9

    const-string v0, "uninitialized"

    goto :goto_0

    .line 144
    :cond_9
    const-string v0, "invalid"

    goto :goto_0
.end method

.method private static _getWiFiState(I)Ljava/lang/String;
    .locals 1
    .param p0, "state"    # I

    .prologue
    .line 120
    packed-switch p0, :pswitch_data_0

    .line 130
    const-string v0, "unknown"

    :goto_0
    return-object v0

    .line 122
    :pswitch_0
    const-string v0, "disabled"

    goto :goto_0

    .line 124
    :pswitch_1
    const-string v0, "disabling"

    goto :goto_0

    .line 126
    :pswitch_2
    const-string v0, "enabled"

    goto :goto_0

    .line 128
    :pswitch_3
    const-string v0, "enabling"

    goto :goto_0

    .line 120
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_3
        :pswitch_2
    .end packed-switch
.end method

.method private static _hasPassword(Landroid/net/wifi/WifiConfiguration;)Z
    .locals 4
    .param p0, "wifiConfig"    # Landroid/net/wifi/WifiConfiguration;

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 162
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->preSharedKey:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 163
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    aget-object v0, v0, v2

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 164
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    aget-object v0, v0, v3

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 165
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    const/4 v1, 0x2

    aget-object v0, v0, v1

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 166
    iget-object v0, p0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    const/4 v1, 0x3

    aget-object v0, v0, v1

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    move v0, v2

    :goto_0
    return v0

    :cond_0
    move v0, v3

    .line 162
    goto :goto_0
.end method

.method private static _match(Landroid/net/wifi/ScanResult;Landroid/net/wifi/WifiConfiguration;)Z
    .locals 3
    .param p0, "result"    # Landroid/net/wifi/ScanResult;
    .param p1, "config"    # Landroid/net/wifi/WifiConfiguration;

    .prologue
    const/4 v2, 0x0

    .line 182
    if-eqz p0, :cond_0

    if-nez p1, :cond_1

    :cond_0
    move v0, v2

    .line 186
    :goto_0
    return v0

    .line 183
    :cond_1
    iget-object v0, p1, Landroid/net/wifi/WifiConfiguration;->BSSID:Ljava/lang/String;

    if-eqz v0, :cond_2

    iget-object v0, p1, Landroid/net/wifi/WifiConfiguration;->BSSID:Ljava/lang/String;

    iget-object v1, p0, Landroid/net/wifi/ScanResult;->BSSID:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    move v0, v2

    goto :goto_0

    .line 184
    :cond_2
    iget-object v0, p1, Landroid/net/wifi/WifiConfiguration;->SSID:Ljava/lang/String;

    iget-object v1, p0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p1, Landroid/net/wifi/WifiConfiguration;->SSID:Ljava/lang/String;

    iget-object v1, p0, Landroid/net/wifi/ScanResult;->SSID:Ljava/lang/String;

    invoke-static {v1}, Lrexsee/network/RexseeWiFi;->_convertToQuotedString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    move v0, v2

    goto :goto_0

    .line 185
    :cond_3
    invoke-static {p0}, Lrexsee/network/RexseeWiFi;->_getSecurity(Landroid/net/wifi/ScanResult;)Ljava/lang/String;

    move-result-object v0

    invoke-static {p1}, Lrexsee/network/RexseeWiFi;->_getSecurity(Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;

    move-result-object v1

    if-eq v0, v1, :cond_4

    move v0, v2

    goto :goto_0

    .line 186
    :cond_4
    const/4 v0, 0x1

    goto :goto_0
.end method

.method private static _removeDoubleQuotes(Ljava/lang/String;)Ljava/lang/String;
    .locals 4
    .param p0, "string"    # Ljava/lang/String;

    .prologue
    const/16 v3, 0x22

    const/4 v2, 0x1

    .line 109
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v0

    .line 110
    .local v0, "length":I
    if-le v0, v2, :cond_0

    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v1

    if-ne v1, v3, :cond_0

    sub-int v1, v0, v2

    invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v1

    if-ne v1, v3, :cond_0

    .line 111
    sub-int v1, v0, v2

    invoke-virtual {p0, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    .line 113
    :goto_0
    return-object v1

    :cond_0
    move-object v1, p0

    goto :goto_0
.end method

.method private _setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 5
    .param p1, "key"    # Ljava/lang/String;
    .param p2, "value"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x0

    .line 231
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 232
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 233
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v4

    .line 245
    :goto_0
    return v2

    .line 236
    :cond_0
    invoke-static {p2}, Lrexsee/network/RexseeWiFi;->isIpAddress(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 237
    const-string v2, "Invalid IP address format."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v4

    .line 238
    goto :goto_0

    .line 241
    :cond_1
    :try_start_0
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    invoke-static {v2, p1, p2}, Landroid/provider/Settings$System;->putString(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 242
    const/4 v2, 0x1

    goto :goto_0

    .line 243
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 244
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v4

    .line 245
    goto :goto_0
.end method

.method static synthetic access$0(I)Ljava/lang/String;
    .locals 1

    .prologue
    .line 119
    invoke-static {p0}, Lrexsee/network/RexseeWiFi;->_getWiFiState(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/network/RexseeWiFi;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 291
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$2(Landroid/net/wifi/SupplicantState;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 133
    invoke-static {p0}, Lrexsee/network/RexseeWiFi;->_getSupplicantState(Landroid/net/wifi/SupplicantState;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private error(Ljava/lang/String;)V
    .locals 4
    .param p1, "msg"    # Ljava/lang/String;

    .prologue
    .line 105
    iget-object v0, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeWiFi;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "WiFi Error: "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 106
    return-void
.end method

.method public static isIpAddress(Ljava/lang/String;)Z
    .locals 8
    .param p0, "value"    # Ljava/lang/String;

    .prologue
    const/16 v7, 0x2e

    const/4 v6, 0x0

    .line 264
    const/4 v4, 0x0

    .line 265
    .local v4, "start":I
    invoke-virtual {p0, v7}, Ljava/lang/String;->indexOf(I)I

    move-result v2

    .line 266
    .local v2, "end":I
    const/4 v3, 0x0

    .line 268
    .local v3, "numBlocks":I
    :goto_0
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v5

    if-lt v4, v5, :cond_0

    .line 287
    const/4 v5, 0x4

    if-ne v3, v5, :cond_4

    const/4 v5, 0x1

    :goto_1
    return v5

    .line 270
    :cond_0
    const/4 v5, -0x1

    if-ne v2, v5, :cond_1

    .line 271
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v2

    .line 275
    :cond_1
    :try_start_0
    invoke-virtual {p0, v4, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    .line 276
    .local v0, "block":I
    const/16 v5, 0xff

    if-gt v0, v5, :cond_2

    if-gez v0, :cond_3

    :cond_2
    move v5, v6

    goto :goto_1

    .line 277
    .end local v0    # "block":I
    :catch_0
    move-exception v5

    move-object v1, v5

    .local v1, "e":Ljava/lang/NumberFormatException;
    move v5, v6

    .line 278
    goto :goto_1

    .line 281
    .end local v1    # "e":Ljava/lang/NumberFormatException;
    .restart local v0    # "block":I
    :cond_3
    add-int/lit8 v3, v3, 0x1

    .line 283
    add-int/lit8 v4, v2, 0x1

    .line 284
    invoke-virtual {p0, v7, v4}, Ljava/lang/String;->indexOf(II)I

    move-result v2

    goto :goto_0

    .end local v0    # "block":I
    :cond_4
    move v5, v6

    .line 287
    goto :goto_1
.end method


# virtual methods
.method public connect(I)V
    .locals 8
    .param p1, "networkId"    # I

    .prologue
    const/4 v7, 0x1

    .line 574
    if-gez p1, :cond_0

    .line 605
    :goto_0
    return-void

    .line 575
    :cond_0
    iget-object v5, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v6, "wifi"

    invoke-virtual {v5, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/net/wifi/WifiManager;

    .line 576
    .local v4, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v5

    if-nez v5, :cond_1

    .line 577
    const-string v5, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    goto :goto_0

    .line 582
    :cond_1
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->getConfiguredNetworks()Ljava/util/List;

    move-result-object v2

    .line 583
    .local v2, "list":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v5

    sub-int v1, v5, v7

    .local v1, "i":I
    :goto_1
    if-gez v1, :cond_2

    .line 594
    new-instance v0, Landroid/net/wifi/WifiConfiguration;

    invoke-direct {v0}, Landroid/net/wifi/WifiConfiguration;-><init>()V

    .line 595
    .local v0, "config":Landroid/net/wifi/WifiConfiguration;
    iput p1, v0, Landroid/net/wifi/WifiConfiguration;->networkId:I

    .line 596
    const v5, 0xf4240

    iput v5, v0, Landroid/net/wifi/WifiConfiguration;->priority:I

    .line 597
    invoke-virtual {v4, v0}, Landroid/net/wifi/WifiManager;->updateNetwork(Landroid/net/wifi/WifiConfiguration;)I

    .line 598
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->saveConfiguration()Z

    .line 601
    invoke-virtual {v4, p1, v7}, Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z

    .line 602
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->reconnect()Z

    goto :goto_0

    .line 584
    .end local v0    # "config":Landroid/net/wifi/WifiConfiguration;
    :cond_2
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiConfiguration;

    .line 585
    .restart local v0    # "config":Landroid/net/wifi/WifiConfiguration;
    if-eqz v0, :cond_3

    .line 586
    new-instance v3, Landroid/net/wifi/WifiConfiguration;

    invoke-direct {v3}, Landroid/net/wifi/WifiConfiguration;-><init>()V

    .line 587
    .local v3, "newConfig":Landroid/net/wifi/WifiConfiguration;
    iget v5, v0, Landroid/net/wifi/WifiConfiguration;->networkId:I

    iput v5, v3, Landroid/net/wifi/WifiConfiguration;->networkId:I

    .line 588
    const/4 v5, 0x0

    iput v5, v3, Landroid/net/wifi/WifiConfiguration;->priority:I

    .line 589
    invoke-virtual {v4, v3}, Landroid/net/wifi/WifiManager;->updateNetwork(Landroid/net/wifi/WifiConfiguration;)I

    .line 583
    .end local v3    # "newConfig":Landroid/net/wifi/WifiConfiguration;
    :cond_3
    add-int/lit8 v1, v1, -0x1

    goto :goto_1
.end method

.method public createMulticastLock()Z
    .locals 3

    .prologue
    .line 682
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 683
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 684
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 685
    const/4 v1, 0x0

    .line 687
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public createWifiLock()Z
    .locals 3

    .prologue
    .line 690
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 691
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 692
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 693
    const/4 v1, 0x0

    .line 695
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public disable()Z
    .locals 3

    .prologue
    .line 327
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 328
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/net/wifi/WifiManager;->setWifiEnabled(Z)Z

    move-result v1

    return v1
.end method

.method public disableNetwork(I)Z
    .locals 3
    .param p1, "networkId"    # I

    .prologue
    .line 631
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 632
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 633
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 634
    const/4 v1, 0x0

    .line 636
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0, p1}, Landroid/net/wifi/WifiManager;->disableNetwork(I)Z

    move-result v1

    goto :goto_0
.end method

.method public disableNetworks()Z
    .locals 7

    .prologue
    const/4 v6, 0x1

    .line 639
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v5, "wifi"

    invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/net/wifi/WifiManager;

    .line 640
    .local v3, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v4

    if-nez v4, :cond_0

    .line 641
    const-string v4, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v4}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 642
    const/4 v4, 0x0

    .line 651
    :goto_0
    return v4

    .line 644
    :cond_0
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->getConfiguredNetworks()Ljava/util/List;

    move-result-object v2

    .line 645
    .local v2, "list":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v4

    sub-int v1, v4, v6

    .local v1, "i":I
    :goto_1
    if-gez v1, :cond_1

    .line 651
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->saveConfiguration()Z

    move-result v4

    goto :goto_0

    .line 646
    :cond_1
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiConfiguration;

    .line 647
    .local v0, "config":Landroid/net/wifi/WifiConfiguration;
    if-eqz v0, :cond_2

    iget v4, v0, Landroid/net/wifi/WifiConfiguration;->status:I

    if-eq v4, v6, :cond_2

    .line 648
    iget v4, v0, Landroid/net/wifi/WifiConfiguration;->networkId:I

    invoke-virtual {v3, v4}, Landroid/net/wifi/WifiManager;->disableNetwork(I)Z

    .line 645
    :cond_2
    add-int/lit8 v1, v1, -0x1

    goto :goto_1
.end method

.method public disableStaticIp()Z
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 405
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 406
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 407
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v5

    .line 415
    :goto_0
    return v2

    .line 411
    :cond_0
    :try_start_0
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "wifi_use_static_ip"

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 412
    const/4 v2, 0x1

    goto :goto_0

    .line 413
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 414
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v5

    .line 415
    goto :goto_0
.end method

.method public disconnect()Z
    .locals 3

    .prologue
    .line 832
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 833
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 834
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 835
    const/4 v1, 0x0

    .line 838
    :goto_0
    return v1

    .line 837
    :cond_0
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->disconnect()Z

    .line 838
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public enable()Z
    .locals 3

    .prologue
    .line 323
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 324
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/net/wifi/WifiManager;->setWifiEnabled(Z)Z

    move-result v1

    return v1
.end method

.method public enableNetwork(I)Z
    .locals 4
    .param p1, "networkId"    # I

    .prologue
    const/4 v3, 0x0

    .line 608
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 609
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 610
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v1, v3

    .line 613
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0, p1, v3}, Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z

    move-result v1

    goto :goto_0
.end method

.method public enableNetworks()Z
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 616
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v5, "wifi"

    invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/net/wifi/WifiManager;

    .line 617
    .local v3, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v4

    if-nez v4, :cond_0

    .line 618
    const-string v4, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v4}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v4, v6

    .line 628
    :goto_0
    return v4

    .line 621
    :cond_0
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->getConfiguredNetworks()Ljava/util/List;

    move-result-object v2

    .line 622
    .local v2, "list":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v4

    const/4 v5, 0x1

    sub-int v1, v4, v5

    .local v1, "i":I
    :goto_1
    if-gez v1, :cond_1

    .line 628
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->saveConfiguration()Z

    move-result v4

    goto :goto_0

    .line 623
    :cond_1
    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiConfiguration;

    .line 624
    .local v0, "config":Landroid/net/wifi/WifiConfiguration;
    if-eqz v0, :cond_2

    iget v4, v0, Landroid/net/wifi/WifiConfiguration;->status:I

    const/4 v5, 0x2

    if-eq v4, v5, :cond_2

    .line 625
    iget v4, v0, Landroid/net/wifi/WifiConfiguration;->networkId:I

    invoke-virtual {v3, v4, v6}, Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z

    .line 622
    :cond_2
    add-int/lit8 v1, v1, -0x1

    goto :goto_1
.end method

.method public enableStaticIp()Z
    .locals 7

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 391
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 392
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 393
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v5

    .line 401
    :goto_0
    return v2

    .line 397
    :cond_0
    :try_start_0
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string v3, "wifi_use_static_ip"

    const/4 v4, 0x1

    invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move v2, v6

    .line 398
    goto :goto_0

    .line 399
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 400
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v2, v5

    .line 401
    goto :goto_0
.end method

.method public forget(I)Z
    .locals 3
    .param p1, "networkId"    # I

    .prologue
    .line 563
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 564
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 565
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 566
    const/4 v1, 0x0

    .line 569
    :goto_0
    return v1

    .line 568
    :cond_0
    invoke-virtual {v0, p1}, Landroid/net/wifi/WifiManager;->removeNetwork(I)Z

    .line 569
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public getBSSID()Ljava/lang/String;
    .locals 4

    .prologue
    .line 760
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 761
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 762
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 763
    const-string v2, ""

    .line 766
    :goto_0
    return-object v2

    .line 765
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 766
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getBSSID()Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

.method public getDHCPInfo()Ljava/lang/String;
    .locals 6

    .prologue
    const-string v5, "\""

    .line 805
    iget-object v3, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v4, "wifi"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/net/wifi/WifiManager;

    .line 806
    .local v2, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v2}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v3

    if-nez v3, :cond_0

    .line 807
    const-string v3, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 808
    const-string v3, ""

    .line 820
    :goto_0
    return-object v3

    .line 810
    :cond_0
    invoke-virtual {v2}, Landroid/net/wifi/WifiManager;->getDhcpInfo()Landroid/net/DhcpInfo;

    move-result-object v0

    .line 811
    .local v0, "dhcp":Landroid/net/DhcpInfo;
    const-string v1, "{"

    .line 812
    .local v1, "rtn":Ljava/lang/String;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "\"dns1\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->dns1:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 813
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"dns2\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->dns2:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 814
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"gateway\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->gateway:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 815
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"ip\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->ipAddress:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 816
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"leaseDuration\":"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->leaseDuration:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 817
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"netmask\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->netmask:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 818
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, ",\"serverAddress\":\""

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget v4, v0, Landroid/net/DhcpInfo;->serverAddress:I

    invoke-static {v4}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\""

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 819
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "}"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    move-object v3, v1

    .line 820
    goto/16 :goto_0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 33
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 29
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "WiFi"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getIpAddress()Ljava/lang/String;
    .locals 4

    .prologue
    .line 778
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 779
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 780
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 781
    const-string v2, "-1"

    .line 784
    :goto_0
    return-object v2

    .line 783
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 784
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getIpAddress()I

    move-result v2

    invoke-static {v2}, Lrexsee/network/RexseeWiFi;->_getIpAddress(I)Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

.method public getLinkSpeed()I
    .locals 4

    .prologue
    .line 796
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 797
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 798
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 799
    const/4 v2, -0x1

    .line 802
    :goto_0
    return v2

    .line 801
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 802
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getLinkSpeed()I

    move-result v2

    goto :goto_0
.end method

.method public getMacAddress()Ljava/lang/String;
    .locals 4

    .prologue
    .line 331
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 332
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 333
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 334
    const-string v2, ""

    .line 337
    :goto_0
    return-object v2

    .line 336
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 337
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getMacAddress()Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

.method public getNetowrkId()I
    .locals 4

    .prologue
    .line 751
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 752
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 753
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 754
    const/4 v2, -0x1

    .line 757
    :goto_0
    return v2

    .line 756
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 757
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getNetworkId()I

    move-result v2

    goto :goto_0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 37
    new-instance v0, Lrexsee/network/RexseeWiFi;

    invoke-direct {v0, p1}, Lrexsee/network/RexseeWiFi;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getRememberedNetworks()Ljava/lang/String;
    .locals 7

    .prologue
    .line 471
    iget-object v5, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v6, "wifi"

    invoke-virtual {v5, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/net/wifi/WifiManager;

    .line 472
    .local v4, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v5

    if-nez v5, :cond_0

    .line 473
    const-string v5, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 474
    const-string v5, "[]"

    .line 483
    .end local p0    # "this":Lrexsee/network/RexseeWiFi;
    :goto_0
    return-object v5

    .line 476
    .restart local p0    # "this":Lrexsee/network/RexseeWiFi;
    :cond_0
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->getConfiguredNetworks()Ljava/util/List;

    move-result-object v1

    .line 477
    .local v1, "list":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->getScanResults()Ljava/util/List;

    move-result-object v2

    .line 478
    .local v2, "results":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/ScanResult;>;"
    const-string v3, ""

    .line 479
    .local v3, "rtn":Ljava/lang/String;
    const/4 v0, 0x0

    .end local p0    # "this":Lrexsee/network/RexseeWiFi;
    .local v0, "i":I
    :goto_1
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v5

    if-lt v0, v5, :cond_1

    .line 483
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "["

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "]"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_0

    .line 480
    :cond_1
    if-eqz v0, :cond_2

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 481
    :cond_2
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/net/wifi/WifiConfiguration;

    invoke-static {v2, p0}, Lrexsee/network/RexseeWiFi;->_getConfiguredNetwork(Ljava/util/List;Landroid/net/wifi/WifiConfiguration;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 479
    add-int/lit8 v0, v0, 0x1

    goto :goto_1
.end method

.method public getRssi()I
    .locals 4

    .prologue
    .line 787
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 788
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 789
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 790
    const/4 v2, -0x1

    .line 793
    :goto_0
    return v2

    .line 792
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 793
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getRssi()I

    move-result v2

    goto :goto_0
.end method

.method public getSSID()Ljava/lang/String;
    .locals 4

    .prologue
    .line 769
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 770
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 771
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 772
    const-string v2, ""

    .line 775
    :goto_0
    return-object v2

    .line 774
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 775
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getSSID()Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

.method public getScanResults()Ljava/lang/String;
    .locals 7

    .prologue
    .line 665
    iget-object v5, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v6, "wifi"

    invoke-virtual {v5, v6}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/net/wifi/WifiManager;

    .line 666
    .local v4, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v5

    if-nez v5, :cond_0

    .line 667
    const-string v5, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v5}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 668
    const-string v5, "[]"

    .line 677
    .end local p0    # "this":Lrexsee/network/RexseeWiFi;
    :goto_0
    return-object v5

    .line 670
    .restart local p0    # "this":Lrexsee/network/RexseeWiFi;
    :cond_0
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->getConfiguredNetworks()Ljava/util/List;

    move-result-object v0

    .line 671
    .local v0, "configs":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/WifiConfiguration;>;"
    invoke-virtual {v4}, Landroid/net/wifi/WifiManager;->getScanResults()Ljava/util/List;

    move-result-object v2

    .line 672
    .local v2, "list":Ljava/util/List;, "Ljava/util/List<Landroid/net/wifi/ScanResult;>;"
    const-string v3, ""

    .line 673
    .local v3, "rtn":Ljava/lang/String;
    const/4 v1, 0x0

    .end local p0    # "this":Lrexsee/network/RexseeWiFi;
    .local v1, "i":I
    :goto_1
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v5

    if-lt v1, v5, :cond_1

    .line 677
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "["

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "]"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_0

    .line 674
    :cond_1
    if-eqz v1, :cond_2

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 675
    :cond_2
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/net/wifi/ScanResult;

    invoke-static {p0, v0}, Lrexsee/network/RexseeWiFi;->_getScanResult(Landroid/net/wifi/ScanResult;Ljava/util/List;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 673
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public getSleepPolicy()Ljava/lang/String;
    .locals 5

    .prologue
    .line 346
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 347
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 348
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 349
    const-string v2, ""

    .line 359
    :goto_0
    return-object v2

    .line 351
    :cond_0
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    .line 352
    const-string v3, "wifi_sleep_policy"

    const/4 v4, 0x0

    .line 351
    invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    .line 353
    .local v0, "value":I
    packed-switch v0, :pswitch_data_0

    .line 359
    const-string v2, "DEFAULT"

    goto :goto_0

    .line 355
    :pswitch_0
    const-string v2, "NEVER"

    goto :goto_0

    .line 357
    :pswitch_1
    const-string v2, "NEVER_WHILE_PLUGGED"

    goto :goto_0

    .line 353
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public getState()Ljava/lang/String;
    .locals 3

    .prologue
    .line 319
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 320
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getWifiState()I

    move-result v1

    invoke-static {v1}, Lrexsee/network/RexseeWiFi;->_getWiFiState(I)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getStaticDNS1()Ljava/lang/String;
    .locals 1

    .prologue
    .line 438
    const-string v0, "wifi_static_dns1"

    invoke-direct {p0, v0}, Lrexsee/network/RexseeWiFi;->_getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getStaticDNS2()Ljava/lang/String;
    .locals 1

    .prologue
    .line 444
    const-string v0, "wifi_static_dns2"

    invoke-direct {p0, v0}, Lrexsee/network/RexseeWiFi;->_getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getStaticGateway()Ljava/lang/String;
    .locals 1

    .prologue
    .line 426
    const-string v0, "wifi_static_gateway"

    invoke-direct {p0, v0}, Lrexsee/network/RexseeWiFi;->_getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getStaticIp()Ljava/lang/String;
    .locals 1

    .prologue
    .line 420
    const-string v0, "wifi_static_ip"

    invoke-direct {p0, v0}, Lrexsee/network/RexseeWiFi;->_getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getStaticNetmask()Ljava/lang/String;
    .locals 1

    .prologue
    .line 432
    const-string v0, "wifi_static_netmask"

    invoke-direct {p0, v0}, Lrexsee/network/RexseeWiFi;->_getStaticIpArgument(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getSupplicantState()Ljava/lang/String;
    .locals 4

    .prologue
    .line 460
    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v3, "wifi"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/wifi/WifiManager;

    .line 461
    .local v1, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v2

    if-nez v2, :cond_0

    .line 462
    const-string v2, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v2}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 463
    const-string v2, ""

    .line 466
    :goto_0
    return-object v2

    .line 465
    :cond_0
    invoke-virtual {v1}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    .line 466
    .local v0, "info":Landroid/net/wifi/WifiInfo;
    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getSupplicantState()Landroid/net/wifi/SupplicantState;

    move-result-object v2

    invoke-static {v2}, Lrexsee/network/RexseeWiFi;->_getSupplicantState(Landroid/net/wifi/SupplicantState;)Ljava/lang/String;

    move-result-object v2

    goto :goto_0
.end method

.method public isEnabled()Z
    .locals 3

    .prologue
    .line 315
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 316
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    return v1
.end method

.method public isListeningToBroascast()Z
    .locals 1

    .prologue
    .line 700
    iget-boolean v0, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    return v0
.end method

.method public isStaticIp()Z
    .locals 4

    .prologue
    const/4 v3, 0x0

    .line 383
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 384
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 385
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v1, v3

    .line 388
    :goto_0
    return v1

    :cond_0
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "wifi_use_static_ip"

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1

    if-eqz v1, :cond_1

    const/4 v1, 0x1

    goto :goto_0

    :cond_1
    move v1, v3

    goto :goto_0
.end method

.method public openSettings()V
    .locals 2

    .prologue
    .line 340
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.net.wifi.PICK_WIFI_NETWORK"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 341
    .local v0, "intent":Landroid/content/Intent;
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 342
    return-void
.end method

.method public pingSupplicant()Z
    .locals 3

    .prologue
    .line 452
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 453
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 454
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 455
    const/4 v1, 0x0

    .line 457
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->pingSupplicant()Z

    move-result v1

    goto :goto_0
.end method

.method public reconnect()Z
    .locals 3

    .prologue
    .line 823
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 824
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 825
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 826
    const/4 v1, 0x0

    .line 829
    :goto_0
    return v1

    .line 828
    :cond_0
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->reassociate()Z

    .line 829
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public remember(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
    .locals 1
    .param p1, "SSID"    # Ljava/lang/String;
    .param p2, "security"    # Ljava/lang/String;
    .param p3, "password"    # Ljava/lang/String;

    .prologue
    .line 487
    const/4 v0, 0x0

    invoke-virtual {p0, v0, p1, p2, p3}, Lrexsee/network/RexseeWiFi;->remember(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    return v0
.end method

.method public remember(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
    .locals 11
    .param p1, "BSSID"    # Ljava/lang/String;
    .param p2, "SSID"    # Ljava/lang/String;
    .param p3, "security"    # Ljava/lang/String;
    .param p4, "password"    # Ljava/lang/String;

    .prologue
    const/4 v6, 0x1

    const/16 v9, 0x22

    const/4 v8, -0x1

    const/4 v7, 0x0

    const-string v10, ""

    .line 490
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v5, "wifi"

    invoke-virtual {v4, v5}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/net/wifi/WifiManager;

    .line 491
    .local v3, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v4

    if-nez v4, :cond_0

    .line 492
    const-string v4, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v4}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v4, v8

    .line 560
    :goto_0
    return v4

    .line 495
    :cond_0
    if-eqz p2, :cond_1

    const-string v4, ""

    invoke-virtual {p2, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 496
    :cond_1
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeWiFi;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    const-string v6, "SSID could not be null or blank."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v4, v8

    .line 497
    goto :goto_0

    .line 499
    :cond_2
    new-instance v0, Landroid/net/wifi/WifiConfiguration;

    invoke-direct {v0}, Landroid/net/wifi/WifiConfiguration;-><init>()V

    .line 500
    .local v0, "config":Landroid/net/wifi/WifiConfiguration;
    if-eqz p1, :cond_3

    const-string v4, ""

    invoke-virtual {p1, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_3

    iput-object p1, v0, Landroid/net/wifi/WifiConfiguration;->BSSID:Ljava/lang/String;

    .line 501
    :cond_3
    invoke-static {p2}, Lrexsee/network/RexseeWiFi;->_convertToQuotedString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Landroid/net/wifi/WifiConfiguration;->SSID:Ljava/lang/String;

    .line 502
    const-string v4, "OPEN"

    invoke-virtual {p3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_5

    .line 503
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    invoke-virtual {v4, v7}, Ljava/util/BitSet;->set(I)V

    .line 557
    :cond_4
    :goto_1
    invoke-virtual {v3, v0}, Landroid/net/wifi/WifiManager;->addNetwork(Landroid/net/wifi/WifiConfiguration;)I

    move-result v2

    .line 558
    .local v2, "networkId":I
    invoke-virtual {v3}, Landroid/net/wifi/WifiManager;->saveConfiguration()Z

    .line 559
    invoke-virtual {v3, v2, v7}, Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z

    move v4, v2

    .line 560
    goto :goto_0

    .line 504
    .end local v2    # "networkId":I
    :cond_5
    const-string v4, "WEP"

    invoke-virtual {p3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_8

    .line 505
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    invoke-virtual {v4, v7}, Ljava/util/BitSet;->set(I)V

    .line 506
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->allowedAuthAlgorithms:Ljava/util/BitSet;

    invoke-virtual {v4, v7}, Ljava/util/BitSet;->set(I)V

    .line 507
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->allowedAuthAlgorithms:Ljava/util/BitSet;

    invoke-virtual {v4, v6}, Ljava/util/BitSet;->set(I)V

    .line 508
    invoke-virtual {p4}, Ljava/lang/String;->length()I

    move-result v4

    if-eqz v4, :cond_4

    .line 509
    invoke-virtual {p4}, Ljava/lang/String;->length()I

    move-result v1

    .line 511
    .local v1, "length":I
    const/16 v4, 0xa

    if-eq v1, v4, :cond_6

    const/16 v4, 0x1a

    if-eq v1, v4, :cond_6

    const/16 v4, 0x3a

    if-ne v1, v4, :cond_7

    :cond_6
    const-string v4, "[0-9A-Fa-f]*"

    invoke-virtual {p4, v4}, Ljava/lang/String;->matches(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_7

    .line 512
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    aput-object p4, v4, v7

    goto :goto_1

    .line 514
    :cond_7
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->wepKeys:[Ljava/lang/String;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v9}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v9}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v4, v7

    goto :goto_1

    .line 517
    .end local v1    # "length":I
    :cond_8
    const-string v4, "WPA/WPA2 PSK"

    invoke-virtual {p3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_a

    .line 518
    iget-object v4, v0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    invoke-virtual {v4, v6}, Ljava/util/BitSet;->set(I)V

    .line 519
    invoke-virtual {p4}, Ljava/lang/String;->length()I

    move-result v4

    if-eqz v4, :cond_4

    .line 520
    const-string v4, "[0-9A-Fa-f]{64}"

    invoke-virtual {p4, v4}, Ljava/lang/String;->matches(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_9

    .line 521
    iput-object p4, v0, Landroid/net/wifi/WifiConfiguration;->preSharedKey:Ljava/lang/String;

    goto :goto_1

    .line 523
    :cond_9
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static {v9}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v9}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Landroid/net/wifi/WifiConfiguration;->preSharedKey:Ljava/lang/String;

    goto/16 :goto_1

    .line 526
    :cond_a
    const-string v4, "EAP"

    invoke-virtual {p3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_b

    .line 551
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeWiFi;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    const-string v6, "WiFi with EAP security is not supported to add manually."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v4, v8

    .line 552
    goto/16 :goto_0

    .line 554
    :cond_b
    iget-object v4, p0, Lrexsee/network/RexseeWiFi;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeWiFi;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    const-string v6, "Invalid security setup."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v4, v8

    .line 555
    goto/16 :goto_0
.end method

.method public scan()Z
    .locals 3

    .prologue
    .line 656
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 657
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 658
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 659
    const/4 v1, 0x0

    .line 662
    :goto_0
    return v1

    .line 661
    :cond_0
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->startScan()Z

    .line 662
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public setSleepPolicy(Ljava/lang/String;)Z
    .locals 6
    .param p1, "policy"    # Ljava/lang/String;

    .prologue
    const/4 v5, 0x0

    .line 363
    iget-object v3, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v4, "wifi"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/net/wifi/WifiManager;

    .line 364
    .local v2, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v2}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v3

    if-nez v3, :cond_0

    .line 365
    const-string v3, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v3}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v3, v5

    .line 377
    :goto_0
    return v3

    .line 369
    :cond_0
    const-string v3, "NEVER"

    invoke-virtual {p1, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    const/4 v1, 0x2

    .line 373
    .local v1, "value":I
    :goto_1
    :try_start_0
    iget-object v3, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "wifi_sleep_policy"

    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 374
    const/4 v3, 0x1

    goto :goto_0

    .line 370
    .end local v1    # "value":I
    :cond_1
    const-string v3, "NEVER_WHILE_PLUGGED"

    invoke-virtual {p1, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    const/4 v1, 0x1

    .restart local v1    # "value":I
    goto :goto_1

    .line 371
    .end local v1    # "value":I
    :cond_2
    const/4 v1, 0x0

    .restart local v1    # "value":I
    goto :goto_1

    .line 375
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 376
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v3, v5

    .line 377
    goto :goto_0
.end method

.method public setStaticDNS1(Ljava/lang/String;)Z
    .locals 1
    .param p1, "ip"    # Ljava/lang/String;

    .prologue
    .line 441
    const-string v0, "wifi_static_dns1"

    invoke-direct {p0, v0, p1}, Lrexsee/network/RexseeWiFi;->_setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public setStaticDNS2(Ljava/lang/String;)Z
    .locals 1
    .param p1, "ip"    # Ljava/lang/String;

    .prologue
    .line 447
    const-string v0, "wifi_static_dns2"

    invoke-direct {p0, v0, p1}, Lrexsee/network/RexseeWiFi;->_setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public setStaticGateway(Ljava/lang/String;)Z
    .locals 1
    .param p1, "ip"    # Ljava/lang/String;

    .prologue
    .line 429
    const-string v0, "wifi_static_gateway"

    invoke-direct {p0, v0, p1}, Lrexsee/network/RexseeWiFi;->_setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public setStaticIp(Ljava/lang/String;)Z
    .locals 1
    .param p1, "ip"    # Ljava/lang/String;

    .prologue
    .line 423
    const-string v0, "wifi_static_ip"

    invoke-direct {p0, v0, p1}, Lrexsee/network/RexseeWiFi;->_setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public setStaticNetmask(Ljava/lang/String;)Z
    .locals 1
    .param p1, "ip"    # Ljava/lang/String;

    .prologue
    .line 435
    const-string v0, "wifi_static_netmask"

    invoke-direct {p0, v0, p1}, Lrexsee/network/RexseeWiFi;->_setStaticIpArgument(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public startListenerForBroadcast()Z
    .locals 6

    .prologue
    const/4 v5, 0x1

    .line 704
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 705
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 706
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    .line 707
    const/4 v1, 0x0

    .line 722
    :goto_0
    return v1

    .line 710
    :cond_0
    iget-boolean v1, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    if-eqz v1, :cond_1

    move v1, v5

    goto :goto_0

    .line 712
    :cond_1
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.WIFI_STATE_CHANGED"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 713
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.STATE_CHANGE"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 714
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKIDSCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.NETWORK_IDS_CHANGED"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 715
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONRSSICHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.RSSI_CHANGED"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 716
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSCANFINISHED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.SCAN_RESULTS"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 717
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTCONNECTIONCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.supplicant.CONNECTION_CHANGE"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 718
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    new-instance v3, Landroid/content/IntentFilter;

    const-string v4, "android.net.wifi.supplicant.STATE_CHANGE"

    invoke-direct {v3, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v2, v3}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 720
    iput-boolean v5, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    move v1, v5

    .line 722
    goto :goto_0
.end method

.method public stopListenerForBroadcast()Z
    .locals 5

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 727
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    const-string v2, "wifi"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    .line 728
    .local v0, "wifi":Landroid/net/wifi/WifiManager;
    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v1

    if-nez v1, :cond_0

    .line 729
    const-string v1, "WiFi is not enabled yet, please call enable()."

    invoke-direct {p0, v1}, Lrexsee/network/RexseeWiFi;->error(Ljava/lang/String;)V

    move v1, v3

    .line 745
    :goto_0
    return v1

    .line 733
    :cond_0
    iget-boolean v1, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    if-nez v1, :cond_1

    move v1, v4

    goto :goto_0

    .line 735
    :cond_1
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 736
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 737
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONNETWORKIDSCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 738
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONRSSICHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 739
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSCANFINISHED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 740
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTCONNECTIONCHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 741
    iget-object v1, p0, Lrexsee/network/RexseeWiFi;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/network/RexseeWiFi;->EVENT_ONSUPPLICANTSTATECHANGED_Receiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 743
    iput-boolean v3, p0, Lrexsee/network/RexseeWiFi;->mIsListeningToBroadcast:Z

    move v1, v4

    .line 745
    goto :goto_0
.end method
